local style = [[{
  AccessModifierOffset: -4,
  AllowShortIfStatementsOnASingleLine: true,
  AlwaysBreakTemplateDeclarations: true,
  AllowShortFunctionsOnASingleLine: false,
  BreakBeforeBraces: Stroustrup,
  IndentWidth: 4,
  Standard: C++11,
}]]
vim.g['clang_style'] = string.format('-style="%s"', style)

-- clang 13 才支持 Language: CSharp,
local csstyle = [[{
  BasedOnStyle: Microsoft,
  IndentWidth: 4,
  AccessModifierOffset: 0,
  BreakBeforeBraces: Stroustrup,
}]]
vim.g['cs_clang_style'] = string.format('--assume-filename="x.cs" -style="%s"', csstyle)

local yapf_style = [[{
    COLUMN_LIMIT: 200
}]]
local yapf_style_args = string.format('--style="%s"', yapf_style)

vim.g.neoformat_python_yapf = {
    exe='yapf',
    stdin=1,
    args={yapf_style_args, },
}

vim.g.neoformat_enabled_python = {'yapf'}

-- npm -g install js-beautify

-- '--trailing-comma', '"none"'
vim.g.neoformat_vue_prettier = {
    exe='C:\\Users\\zhaoguopan\\workbench\\node_modules\\.bin\\prettier',
    stdin=1,
    args={'--stdin-filepath', '"%:p"', '--parser', 'vue'},
}
vim.g.neoformat_typescript_prettier = {
    exe='C:\\Users\\zhaoguopan\\workbench\\node_modules\\.bin\\prettier',
    stdin=1,
    args={'--stdin-filepath', '"%:p"', '--parser', 'typescript', '--print-width', '120'},
}
vim.g.neoformat_javascript_prettier = {
    exe='C:\\Users\\zhaoguopan\\workbench\\node_modules\\.bin\\prettier',
    stdin=1,
    args={'--stdin-filepath', '"%:p"', '--print-width', '120'},
}

vim.g.neoformat_enabled_vue = {'prettier'}
vim.g.neoformat_enabled_typescript = {'prettier'}
vim.g.neoformat_enabled_javascript = {'prettier'}
-- https://prettier.io/docs/en/watching-files.html
